package com.mano.mall.web.pay.feign;

import com.mano.mall.api.dto.pay.output.PayMentTransacDTO;
import com.mano.mall.api.pay.PayMentTransacInfoService;
import com.mano.mall.common.base.BaseApiService;
import com.mano.mall.common.base.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;

@FeignClient(value = "mano-mall-pay",fallback = PayMentTransacInfoFeignCallBack.class)
public interface PayMentTransacInfoFeign extends PayMentTransacInfoService {
}

@Component
class PayMentTransacInfoFeignCallBack extends BaseApiService implements PayMentTransacInfoFeign{
    @Override
    public BaseResponse<PayMentTransacDTO> tokenByPayMentTransac(String token) {
        return setResultError("服务器忙，请稍后重试");
    }
}